package com.zy.design.pattern.factory.method;

import com.zy.design.pattern.factory.base.IRuleConfigParser;

/**
 * @author zhaoyi
 * @date 2021/3/30 14:38
 * 模拟 当对象的创建逻辑比较复杂
 */
public class EsRuleConfigFactory implements IMethodRuleConfigFactory {

    private static EsRuleConfigParser esRuleConfigParser;

    static {
        EsCli esCli = new EsCli("192.168.0.1", "9200");
        esRuleConfigParser = new EsRuleConfigParser(esCli);
    }

    @Override
    public IRuleConfigParser createParser() {
        return esRuleConfigParser;
    }
}
